#ifndef CREATURE_H
#define CREATURE_H

#include <string>
#include "Common/Common.h"
#include "GameCore/Core.h"
#include "Command.h"
#include "IPart.h"

class Creature : public IEntity
{
public:
	Creature();
	virtual ~Creature();

	void AddPart( IPart* part );
	void RemovePart( IPart* part );

	void LinkParts( IPart* partA, IPart* partB );
	void UnlinkParts( IPart* partA, IPart* partB );

	void ProcessCommand( const Command& command );

	virtual void Update( float dt );
	virtual void Draw() const;

	virtual const cmn::IIterable<IPart*>* GetParts();

private:
	IPart* m_head;
	int m_partsCount;
	cmn::Graph<IPart*> m_parts;

};

#endif
